package com.huawei.hwCloudJs.service.hms;

import android.app.Activity;
import android.content.Intent;
import com.huawei.hwCloudJs.support.b.d;

public class a extends com.huawei.hwCloudJs.support.b.c<b> {
    private static a a = new a();

    public interface c {
        void a(b bVar);
    }

    static final class a implements com.huawei.hwCloudJs.support.b.b<b> {
        private int a;
        private c b;

        public a(int i, c cVar) {
            this.a = i;
            this.b = cVar;
        }

        public boolean a(b bVar) {
            if (this.a != bVar.c) {
                return true;
            }
            this.b.a(bVar);
            return false;
        }

        public /* synthetic */ boolean onReceive(d dVar) {
            return a((b) dVar);
        }
    }

    public static final class b extends d {
        private Intent a;
        private int b;
        private int c;

        public Intent a() {
            return this.a;
        }

        public void a(int i) {
            this.b = i;
        }

        public void a(Intent intent) {
            this.a = intent;
        }

        public int b() {
            return this.b;
        }

        public void b(int i) {
            this.c = i;
        }

        public int c() {
            return this.c;
        }
    }

    public static a a() {
        return a;
    }

    public void a(int i, c cVar) {
        a().a(new a(i, cVar));
    }

    public void a(Activity activity, Intent intent, int i, c cVar) {
        a().a(new a(i, cVar));
        activity.startActivityForResult(intent, i);
    }
}
